package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.TestSubject;
import com.ruoyi.mapper.TestSubjectMapper;
import com.ruoyi.service.ITestSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 考试平台学科Service业务层处理
 *
 */
@Service
public class TestSubjectServiceImpl extends ServiceImpl<TestSubjectMapper,TestSubject> implements ITestSubjectService
{
    @Autowired
    private TestSubjectMapper testSubjectMapper;

    /**
     * 查询考试平台学科列表
     *
     * @param testSubject 考试平台学科
     * @return 考试平台学科
     */
    @Override
    public List<TestSubject> selectTestSubjectList(TestSubject testSubject)
    {
        return testSubjectMapper.selectTestSubjectList(testSubject);
    }

    @Override
    public TestSubject selectTestSubjectByExamId(Long subjectId) {
        return testSubjectMapper.selectTestSubjectBySubjectId(subjectId);
    }

    /**
     * 新增考试平台学科
     *
     * @param testSubject 考试平台学科
     * @return 结果
     */
    @Override
    public int insertTestSubject(TestSubject testSubject)
    {
        return testSubjectMapper.insertTestSubject(testSubject);
    }

    /**
     * 修改考试平台学科
     *
     * @param testSubject 考试平台学科
     * @return 结果
     */
    @Override
    public int updateTestSubject(TestSubject testSubject)
    {
        return testSubjectMapper.updateTestSubject(testSubject);
    }


    /**
     * 获取年级下拉框
     */
    @Override
    public List<String> getGrade() {
        return testSubjectMapper.getGrade();
    }
    /**
     * 获取学科下拉框
     */
    @Override
    public List<String> getSubject() {
        return testSubjectMapper.getSubject();
    }


}
